package com.combetter.changxing.fragment;


import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.combetter.changxing.R;
import com.combetter.changxing.base.ActivityManager;
import com.combetter.changxing.base.BaseFragment;
import com.combetter.changxing.mine.MessageActivity;
import com.combetter.changxing.utils.ToastUtils;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * @author Vany Liu
 * e-mail liu1281781414@outlook.com
 * Created ${date} ${time}
 * description :我的Fragment
 **/
public class MineFragment extends BaseFragment {


    @Bind(R.id.tv_title_name)
    TextView tvTitleName;
    @Bind(R.id.iv_right)
    ImageView ivRight;
    @Bind(R.id.actionbar)
    Toolbar actionbar;
    @Bind(R.id.iv_mine_head)
    ImageView ivMineHead;
    @Bind(R.id.tv_name)
    TextView tvName;
    @Bind(R.id.rl_mine_zl)
    RelativeLayout rlMineZl;
    @Bind(R.id.tv_mine_message)
    TextView tvMineMessage;
    @Bind(R.id.tv_mine_shop)
    TextView tvMineShop;
    @Bind(R.id.tv_mine_update)
    TextView tvMineUpdate;
    @Bind(R.id.tv_mine_help)
    TextView tvMineHelp;
    @Bind(R.id.tv_chat)
    TextView tvChat;

    @Override
    protected int layoutId() {
        return R.layout.fragment_mine;
    }

    @Override
    protected void initViews(View view) {
//        Glide.with(context).load(list.get(position).getImgsrc())
//                .apply(RequestOptions.bitmapTransform(new CircleCrop()))
//                .into(holder.img);

        tvTitleName.setText("我的");


    }


    @Override
    protected void loadData() {

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        ButterKnife.bind(this, rootView);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }


    @OnClick({R.id.rl_mine_zl, R.id.tv_mine_message, R.id.tv_mine_shop, R.id.tv_mine_update, R.id.tv_mine_help, R.id.tv_chat})
    public void onViewClicked(View view) {
        switch (view.getId()) {

            case R.id.rl_mine_zl:
                ToastUtils.showToast("个人资料");
                break;
            case R.id.tv_mine_message:
              startActivity(MessageActivity.class);
                break;
            case R.id.tv_mine_shop:

                ToastUtils.showToast("商城");
                break;
            case R.id.tv_mine_update:
                ToastUtils.showToast("软件升级");
                break;
            case R.id.tv_mine_help:
                ToastUtils.showToast("帮助中心");

                break;
            case R.id.tv_chat:
                ToastUtils.showToast("联系客服");
                break;
            default:
                break;
        }
    }
}
